package com.shujia.spark

import org.apache.spark.{SparkConf, SparkContext}

object Demo22Config {

  def main(args: Array[String]): Unit = {

    val conf: SparkConf = new SparkConf()
      .setMaster("yarn-client")
      .setAppName("map")

    /**
      * 参数优先级
      *
      * 1 , 代码优先级最高
      *
      * 2 , 提交任务的时候指定参数   spark-submit
      *   --conf spark.shuffle.file.buffer=64K
      *
      * 3 , spark的默认配置文件
      *
      *
      *
      */


    conf.set("spark.shuffle.file.buffer", "64K")
    conf.set("spark.reducer.maxSizeInFlight", "96M")


    val sc: SparkContext = new SparkContext(conf)


  }

}
